<!--
 * @Descripttion: 测试案例
 * @Author: 银河以北
 * @Date: 2021-09-26 19:59:11
 * @LastEditors: 银河以北
 * @LastEditTime: 2021-10-09 15:39:49
-->
<template>
  <div>
    <!-- <button @click="getUserName"> {{username}}</button> -->
    <div class='test'>123456845</div>
    <el-row>
      <div id="content">
        <p @click="changeTheme('theme1')">1</p>
        <p @click="changeTheme('theme2')">2</p>
        <p @click="changeTheme('theme3')">3</p>
      </div>

    </el-row>
  </div>
</template>
<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Test",
  setup() {
    const changeTheme = (theme: string) => {
      console.log(theme);
      window.document.documentElement.setAttribute("data-theme", theme);
    };
    return {
      changeTheme,
    };
  },
});
</script>
<style  lang="scss" scoped>
</style>